﻿    function e(id) 
    {
      return document.getElementById(id);
    }
    
    function getWindowHeight() 
    {
      if (window.self && self.innerHeight) 
        {return self.innerHeight;}
      if (document.documentElement && document.documentElement.clientHeight) 
        {return document.documentElement.clientHeight;}
      return 0;
    }
      
    function resizeApp() 
    {
      var offsetTop = 0;
      var mapElem = e("map_canvas");
      for (var elem = mapElem; elem; elem = elem.offsetParent) 
      {
        offsetTop += elem.offsetTop;
      }
      var height = getWindowHeight() - offsetTop - 30;
      alert(height);
      if (height >= 0) 
      {
        mapElem.style.height = height + "px";
//        e("wpanel").style.height =e("panel").style.height = (height + 4) + "px";
//        e("paneltoggle").style.paddingTop = (height/2) + "px";
//        e("paneltoggle").style.paddingBottom = (height/2) + "px";
//        var sp = e("spsizer");sp.style.height = Math.max(0, height - sp.offsetTop) + "px";
      }
    }
